home *** CD-ROM | disk | FTP | other *** search
- //ONE_FILE.BTS for STalker 3.x by Bob Morrow (GEnie - R.MORROW10).
- //This file is useful for GEnie only, unless someone modifies it for
- //another online service. (Go for it!) It lets you pick which
- //RoundTable to go to and the file number, then calls GEnie and
- //makes it's way to the library you specified, grabs the file and
- //hangs up. This presumes you know the file number you're after,
- //since that number is a requirement.
- //
- //Operation is simple. Start the script, enter the page number of
- //the RoundTable library where your file is located, then enter the
- //file's number. Hit <return> after each entry. Since the script
- //uses the dial_one() command, after the file number is entered the
- //script tells the autodialer to do it's thing, which includes
- //sending autologon strings! Once all autologon strings are passed,
- //the script takes over again. NOTE: Do -not- enter m<page>;3 like
- //you normally would. (e.g. m475;3) Just enter the page #; the script
- //adds the m and ;3 for you!
- //
- //Make sure your autodialer entry for GEnie is spelled like that,
- //not GEnie1, General Electric Net, etc. The script's dial_one()
- //command looks for GEnie. It is case-insensitive, which means
- //genie is also ok.
- //
- //Due to the nature of the port_printf() command, once you're logged
- //onto GEnie, it will not display m<page>;3 or the file number, but
- //they are there. All other commands are echoed to the screen,
- //since they use port_send().
- //
- //Shift/Alt/Undo is the only way to stop the script cleanly. If you
- //just press Undo, it will just advance to the next line in the
- //script. This is true of all scripts, not just this one, though I
- //would like to find a better solution. Your comm settings may have
- //been affected as well.
- //
- //If for some reason you entered the wrong file number, this script
- //as it stands now can't deal with that. It keeps waiting for a
- //GEnie string that will never come.
-
- function main()
- string page[10];
- string file[10];
- int numchars;
-
-
- puts("\r\nEnter the page number of the RoundTable library you want to go to: \r\n");
- numchars=gets(page,6);
-
- puts("\r\nEnter the file number you want to download: \r\n");
- numchars=gets(file,7);
- puts("\r\n");
-
- dial_one("GEnie", NULL); //Script allows autodialer's
- //autologon sequence to do it's
- //thing, then takes over.
- wait_for("or <CR> to continue?",0);
- port_printf("m%s 3\r",page); //Script moves to the page number
- wait_for("Library?",0);
- port_send("6\r", TRUE);
- wait_for("request or <H>elp?",0);
- port_printf("%s\r",file); //Script enters the file number
-
- // if not wait_for ("Again (Y/N)?",0) then //Can't find file,
- // port_send("n\r"); //so let's log off.
- // wait_for("Library?",0); //This isn't working!
- // port_send("bye\r", TRUE);
- // endif
- // else
-
- wait_for("?",0);
- port_send("d\r", TRUE);
- wait_for("<RETURN> to skip?",0);
- port_send("4\r", TRUE); //Script downloads file via ZModem
- set_protocol(4);
- download();
- wait_for("another file (Y/N)?",0);
- port_send("n\r",TRUE);
- wait_for("Library?",0);
- port_send("bye\r",TRUE); //Hey, we didn't get caught! Let's
- //get outta here.
- endfunction